//
//  ViewController.swift
//  SwiftJSON
//
//  Created by LiynXu on 2016/9/27.
//  Copyright © 2016年 LiynXu. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
       
        let url = "http://iappfree.candou.com:8080/free/applications/limited?currency=rmb&page=1&limit=5"
        
        Request.delegate = self
        Request.GetRequest(url, parameters: nil)
        
    }

}
extension ViewController:NetRequestDelagate{
    func finish(responseObject: AnyObject?) {
        //outLog(responseObject!)
        
        let dict = responseObject as! [String:AnyObject]
        
        let app = ApplicationsModel()
        app.setValuesForKeysWithDictionary(dict)
        //outLog(app.applications)
        print(app.applications)
    }
    func failred(error: NSError) {
        outLog(error)
    }
}



